const db = require('../../libs/database');

module.exports = async (id, key, value) => {
    const v = typeof value === 'object' ? JSON.stringify(value) : value;
    const addSql = `UPDATE user_info SET ${key} = '${v}' WHERE user_uid = '${id}' `;
    return await db.query(addSql);
};
